<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0">
		<title>空域综合态势-查看情报分发</title>
		<link href="css/ele2.3.3.css" rel="stylesheet" type="text/css">
		<link href="css/flyDetail.css" rel="stylesheet" type="text/css">
	</head>

	<body>
		<!-- <div id="load"><loading v-show="showLoading"></loading></div> -->
		<div id="app" v-cloak>
			<header>
				<div class="logo">空域综合态势</div>
			</header>
			<div class="Wraper">
				<div class="mainBody">
					<h2>查看情报分发</h2>
					<!--工具条-->
					<el-col :span="24" class="toolbar toolbar-cns">
						<el-form class="clearfix" :inline="true" :model="queryParams">
							<el-form-item label="情报类型:">
								<el-input  v-model="queryParams.s.intelligenceType" placeholder="请输入"></el-input>
							</el-form-item>
							<el-form-item label="航空器注册号:">
								<el-input  v-model="queryParams.s.aircraftRegNumber" placeholder="请输入"></el-input>
							</el-form-item>
							<el-form-item label="发送服务站:">
								<el-input  v-model="queryParams.s.sendFss" placeholder="请输入"></el-input>
							</el-form-item>
							<el-form-item class="clearfix">
								<div class="header clearfix">
									<!-- <el-button class="add-synchro" @click="synchroFlightFly">同步飞行计划</el-button> -->
									<el-button style="margin-right:30px;" class="add-bottom" @click="fetchData">查询</el-button>
								</div>
							</el-form-item>
						</el-form>
					</el-col>
					<!--列表-->
					<main>
						<div class="table-box">
							<el-table :data="tableData" v-loading="loading" element-loading-text="数据加载中..." 
							border style="width: 100%">
								<el-table-column prop="id" label="id" min-width="160" align="center"></el-table-column>
								<el-table-column prop="send_time" label="发送时间" min-width="120"  align="center"></el-table-column>								
								<el-table-column prop="intelligence_type" label="情报类型" align="center"></el-table-column>								
								<el-table-column prop="intelligence_content" label="情报内容"  align="center"></el-table-column>								
								<el-table-column prop="effective_start" label="时效起" min-width="160" align="center"></el-table-column>								
								<el-table-column prop="effective_end" label="时效止" min-width="160" align="center"></el-table-column>								
                                <el-table-column prop="aircraft_reg_number" label="航空器注册号" min-width="160" align="center"></el-table-column>
                                <el-table-column prop="send_fss" label="发送服务站" min-width="160" align="center"></el-table-column>
                                <el-table-column prop="send_people" label="发送人" min-width="160" align="center"></el-table-column>
                                <!-- <el-table-column prop="remark" label="备注" min-width="160" align="center"></el-table-column>								 -->
								<!-- <el-table-column label="操作" align="center">
									<template slot-scope="scope">
										
										<a :href="'flyDetail.html?id='+scope.row.id" target="_self">查看</a>
									</template>
								</el-table-column> -->
						   </el-table>

							<!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
							:current-page="queryParams.s.page" :page-sizes="[10, 20, 50]" :page-size="queryParams.s.size"
							layout="total, sizes, prev, pager, next, jumper" :total="total">
							</el-pagination> -->
						</div>
					</main>
					<!-- 同步用户对话框 -->
					<el-dialog :title="title[dialogType]" :visible.sync="synchroUserVisible" class="synchroUser" center>
						<el-form :model="synchroForm" class="clearfix">
							<el-form-item label="服务站" prop="userLoginName">
								<el-select v-model="synchroForm.id" clearable placeholder="请选择服务站">
									<el-option
										v-for="item in options"
										:key="item.value"
										:label="item.label"
										:value="item.value">
									</el-option>
								</el-select>
							</el-form-item>
							<el-form-item label="同步日期" prop="userLoginName">
								<el-date-picker
									v-model="queryParams.executorDate"
									type="date"
									value-format="yyyy-MM-dd">
								</el-date-picker>
							</el-form-item>
						</el-form>
						<div slot="footer" class="dialog-footer">
							<el-button @click="synchroUserVisible = false">取 消</el-button>
							<el-button type="primary" @click="synchroUserFinishAdd">确 定</el-button>
						</div>
					</el-dialog>

				</div>
			</div>
		</div>

		<script src="plugins/vue2.5.9.js"></script>
		<script src="plugins/axios.min.js"></script>
		<!--<script src="plugins/ele2.3.3.js"></script>-->
		<script src="plugins/element-ui.js"></script>
		<script src="plugins/httpVueLoader.js"></script>
		<script src="plugins/jquery.min.js"></script>
		<script src="plugins/leaflet.js"></script>
		<script src="plugins/iclient9-leaflet.min.js"></script>
		<script src="plugins/leaflet.draw.js"></script>
		<script src="plugins/leaflet.measurecontrol.min.js"></script>
		<script src="plugins/leaflet.rotatedMarker.js"></script>

		<script type="text/javascript">
			var vm = new Vue({
				el: '#app',
				data: {
					queryParams: {
                        s: {
                            aircraftRegNumber: "",
                            effectiveEnd: "",
                            effectiveStart: "",
                            id: "",
                            intelligenceContent: "",
                            intelligenceType: "",
                            remark: "",
                            sendFss: "",
                            sendPeople: "",
                            sendTime: ""
                        }
					},
					loading: false,
					tableData: [],
					total: 0,
					dialogFormVisible: false,
					dialogType: '',
					//baolin
					options: [],
					synchroUserVisible: false,
					synchroForm: {
						regionId: ''
					},
					title: {
						create: '新增VHF电台',
						edit: '修改VHF电台',
						look: '查看VHF电台',
						synchroUser: '同步飞行计划'
					},
					// commonUrl: 'http://dkjs.op-fly.cn/system/', //公共部分url
					commonUrl: 'http://212.64.57.59:10006/', //212
				},
				created: function() {
					this.fetchData()
				},
				mounted: function() {

				},
				methods: {
					// 获取用户数据
					fetchData () {
						 this.loading = true
						 var self = this;
						 var parms = self.queryParams;
						 console.log(parms)
						 axios.post(self.commonUrl + 'intelligenceDistribution/selectAll', parms).then(function(response) {
							if(response.status == 200) {
								console.log(response)
								self.tableData = response.data.intells
								// self.total = response.data.page.totalCount
								self.loading = false
							}
						}).catch(function(error) {
							console.log(error);
						});
						// getFlyList(this.queryParams).then(res => {
						// 	console.log(res)
						// 	this.tableData = res.page.records
						// 	this.total = res.page.totalCount
						// 	this.loading = false
						// })
					},
					//同步飞行计划
					synchroFlightFly () {
						//this.synchroUserVisible = true
						//this.dialogType = 'synchroUser'
					},
					//完成同步同步飞行计划接口
					synchroUserFinishAdd () {

					},
					handleSizeChange (value) {
						this.queryParams.size = value
						this.fetchData()
					},
					handleCurrentChange (value) {
						this.queryParams.page = value
						this.fetchData()
					}
				}
			});
		</script>

	</body>

</html>